package com.dnjn.happiness.biz.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dnjn.happiness.common.core.annotation.Excel;
import com.dnjn.happiness.common.core.web.domain.BaseEntity;
import com.dnjn.happiness.system.api.domain.SysDept;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 培训签到记录对象 training_record
 *
 * @author happiness
 * @date 2023-10-17
 */
@Schema(name = "TrainingRecord", description = "培训签到记录")
@Accessors(chain = true)
@Getter
@Setter
@TableName("biz_training_record")
public class TrainingRecord extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(value = "training_record_id", type = IdType.ASSIGN_ID)
    private Long trainingRecordId;

    
    



    /** $column.columnComment */
    @Schema(description = "${comment}")
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Long trainingId;

    /** $column.columnComment */
    @Schema(description = "${comment}")
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Long userId;
    @Schema(description = "培训状态")
    private String trainingRecordStatus;
    @Schema(description = "培训反馈")
    private String result;



    @Schema(description = "头像")
    @TableField(exist = false)
    private String avatar;

    @Schema(description = "昵称")
    @TableField(exist = false)
    private String nickName;

//    @Schema(description = "应参与")
//    @TableField(exist = false)
//    private String shouldBeInvolved;

    @Schema(description = "已参与")
    @TableField(exist = false)
    private String countY;

    @TableField(exist = false)
    private Long deptId;

    @TableField(exist = false)
    private SysDept sysDept;

    @TableField(exist = false)
//    private List<SysRole> role;
    private String role;// 1 是普通 ,2 不是

    /** 是否删除 */
    private String deleted;




    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("trainingRecordId", getTrainingRecordId())
                .append("trainingId", getTrainingId())
                .append("userId", getUserId())
                .toString();
    }
}
